﻿@model IEnumerable<Comercio.Models.DBM.tb_stock_historico>

@{
    ViewBag.Title = "Index";
}

<h2>Administrar stock histórico</h2>

<p>
    @Html.ActionLink("Ingresar nuevo movimiento", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.tb_producto.descripcion)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.tb_proveedor.razon_social)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.cantidad)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.precio_compra)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.fecha_compra)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.tb_producto.descripcion)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.tb_proveedor.razon_social)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.cantidad)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.precio_compra)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.fecha_compra)
        </td>
   
          <td>
            @Html.ActionLink("(borrar)Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
            @Html.ActionLink("(borrar)Details", "Details", new { /* id=item.PrimaryKey */ }) |
            @Html.ActionLink("(borrar)Delete", "Delete", new { /* id=item.PrimaryKey */ })
        </td>
       
    </tr>
}

</table>
<div>
    @Html.ActionLink("Volver", "Admin", "Home")
</div>